package com.ihr360.sharedservice.exceptionmail.service.impl;

import com.ihr360.sharedservice.exceptionmail.dao.SystemConfigDao;
import com.ihr360.sharedservice.exceptionmail.dto.SystemConfig;
import com.ihr360.sharedservice.exceptionmail.service.SystemConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by Eric on 2018/6/7/007.
 */
@Service
public class SystemConfigServiceImpl implements SystemConfigService {

    @Autowired
    private SystemConfigDao systemConfigDao;

    @Override
    public String getExceptionNotifyEmail() {
        SystemConfig config = systemConfigDao.findByConfigKey(SystemConfig.Keys.EXCEPTION_NOTIFY_EMAIL);
        return config == null ? null : config.getValue();
    }

}
